NAME = PyTAMP
VERSION = 0.1
DIST = $(NAME)_$(VERSION)

lib:
	cd RootFind; make
	cd MotionPlanning; make
	cp RootFind/rootfind.py RootFind/vectorfield.py RootFind/_rootfind.so .
	cp MotionPlanning/_motionplanning.so .
	cp MotionPlanning/motionplanning.py .

cygwin: lib
	mv _motionplanning.so _motionplanning.dll
	mv _rootfind.so _rootfind.dll

pysvg:
	cd pysvg-0.2.1; python setup.py install

geometry:
	cd geometry; python setup.py build_ext --inplace

robot:
	cd robot; make deps; python setup.py build_ext --inplace; make docs

modules geometry robot:
	;

clean:
	-rm -f *.pyc
	-rm -f *.so
	-rm -f *.dll
	-rm rootfind.py motionplanning.py
	-cd MotionPlanning; make clean
	-cd RootFind; make clean

dist:
	mkdir -p $(DIST)
	cp *.py Makefile README.txt $(DIST)/
	mkdir -p $(DIST)/RootFind
	mkdir -p $(DIST)/MotionPlanning
	mkdir -p $(DIST)/Collide
	cp RootFind/*.h RootFind/*.cpp Rootfind/*.i Rootfind/Makefile* $(DIST)/RootFind
	cp MotionPlanning/*.h MotionPlanning/*.cpp MotionPlanning/*.i MotionPlanning/Makefile* $(DIST)/MotionPlanning
	cp Collide/*.h Collide/*.cpp Collide/*.i Collide/Makefile* $(DIST)/Collide
	cp -r problems $(DIST)/
	zip -r $(DIST).zip $(DIST) 
